<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
<style>
    div{
    width:660px;
    }
    p{
    width:200px;
    height:200px;
    background-color:silver;
    background-image:url(balloon.jpg);
    background-repeat: no-repeat;
    float:left;
    margin:10px;
    text-align: center;
    }
    #a1{
    background-position:left top;
    }
    #a2{
    background-position:top;
    }
    #a3{
    background-position:right top;
    }
    #b1{
    background-position:0%;
    }
    #b2{
    background-position:50%;
    }
    #b3{
    background-position:100%;
    }
    #c1{
    background-position: 0px 100px;
    }
    #c2{
    background-position: 50px 100px;
    }
    #c3{
    background-position: 100px 100px;
    }
</style>
</head>
<body>
<h3>CSS属性background - image 的应用</h3>
<hr>
<div>
    <p id="a1">left_top</p>
    <p id="a2">top</p>
    <p id="a3">right_top</p>
    <p id="b1">right 0%</p>
    <p id="b2">50% 50%</p>
    <p id="b3">100% 50%</p>
    <p id="c1">0px 100px</p>
    <p id="c2">50px 100px</p>
    <p id="c3">100px 100px</p>
</div>
</body>
</html>